package commons.utils.facades;

import org.eclipse.swt.widgets.Shell;

import commons.utils.facades.DirectoryDialogFacade;
import commons.utils.facades.internal.FacadeFactory;

public abstract class DirectoryDialogFacade {

    private static final DirectoryDialogFacade _INSTANCE = FacadeFactory.createFacade(DirectoryDialogFacade.class);

    public static DirectoryDialogFacade getDefault() {
        return _INSTANCE;
    }

    public static String getDirectoryFromDialog(Shell shell) {
        return getDefault().getDirectoryFromDialogImpl(shell, null);
    }

    public static String getDirectoryFromDialog(Shell shell, String filter) {
        return getDefault().getDirectoryFromDialogImpl(shell, filter);
    }

    protected abstract String getDirectoryFromDialogImpl(Shell shell, String filter);

}
